a='he'
b='   shuai'
d=b.strip()
c=a.title()+' '+d.title()
print(c)

cars=['d','g','a','l','c']
cars.sort(reverse=True)
print(cars)
cars=['d','g','a','l','c']
cars.reverse()
print(cars)
print('哈喽呀！知道你现在学习很艰难，没事难了就慢慢来，不要急，毕竟选择了这条路就一直坚持下来')
for i in range(1,11):
    print('何帅：加油！加油！再加油！坚持！坚持！再坚持{0}'.format(i))


magicians = ['alice', 'david', 'carolina']
for i in range(10):
    square=i*2
    magicians.append(square)
    print(magicians)
print('-'*30)
he=magicians
print(he)
dimensions = (200, 50)
print(dimensions[0])
print(dimensions[1])
dimensions = (200, 50)
#dimensions[0] = 250

a=eval(input('请输入你的成绩：'))

if a<60:
    print('不及格！')
elif a>=60 and a <=70 :
    print('刚好及格！')
elif a >=80 and a <=90:
    print('不错！')
else:
    print('太棒了！')

alien_0 = {'x_position': 0, 'y_position': 25, 'speed': 'slow'}
print("Original x-position: " + str(alien_0['x_position']))
# 向右移动外星人
# 据外星人当前速度决定将其移动多远
if alien_0['speed'] == 'slow':
    x_increment = 1
elif alien_0['speed'] == 'medium':
    x_increment = 2
else:
 # 这个外星人的速度一定很快
    x_increment = 3
# 新位置等于老位置加上增量
alien_0['x_position'] = alien_0['x_position'] + x_increment

print("New x-position: " + str(alien_0['x_position']))

num=[
    ['hehe','kk','dafdfa'],
    ['hehe', 'kk', 'dafdfa'],
    ['hehe', 'kk', 'dafdfa'],
]
for i in num:
    for j in i:
        print(j,end='')
    print()

user_0 = {
 'username': 'efermi',
 'first': 'enrico',
 'last': 'fermi',
 }
for key, value in user_0.items():
    print("\nKey: " + key)
    print("Value: " + value)

favorite_languages = {
    'jen': 'python',
    'sarah': 'c',
    'edward': 'ruby',
    'phil': 'python',
}
friends = ['phil', 'sarah']
for name in favorite_languages.keys():
    print(name.title())

    if name in friends:
        print(" Hi " + name.title() +
          ", I see your favorite language is " +
          favorite_languages[name].title() + "!")

aliens = []
# 创建30个绿色的外星人
for alien_number in range(30):
    new_alien = {'color': 'green', 'points': 5, 'speed': 'slow'}
    aliens.append(new_alien)

# 显示前五个外星人
for alien in aliens[:5]:
    print(alien)
print("...")
# 显示创建了多少个外星人
print("Total number of aliens: " + str(len(aliens)))